package com.alibaba.csp.sentinel.dashboard.rule.nacos.flow;

import com.alibaba.csp.sentinel.adapter.gateway.common.rule.GatewayFlowRule;
import com.alibaba.csp.sentinel.dashboard.datasource.entity.gateway.GatewayFlowRuleEntity;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangtengfei
 * @date 2021/6/11 10:19
 */

@Component("gatewayFlowRuleNacosProvider")
public class GatewayFlowRuleNacosProvider {
    
//    public List<GatewayFlowRuleEntity> getRules(String appName, String ip, Integer port) {
//        List<GatewayFlowRuleEntity> gatewayFlowRuleEntityList = new ArrayList<>();
//        List<GatewayFlowRule> gatewayFlowRuleList = getRules(appName);
//        for (GatewayFlowRule gatewayFlowRule : gatewayFlowRuleList) {
//            gatewayFlowRuleEntityList.add(GatewayFlowRuleEntity.fromGatewayFlowRule(appName, ip, port, gatewayFlowRule));
//        }
//        return gatewayFlowRuleEntityList;
//    }
}
